<template>
	<view>
		<flowtool :outid="formState.Id" :flowid="flowId ? flowId : '2'" :deptid="formState.DeptId" :outshowbutton="formState.Status=='未立项'" :dataname="formState.Name" :formstate="formState"></flowtool>
		<projinfo :projid='projid'></projinfo>
	</view>
</template>

<script>
	import projinfo from "../c_projinfo.vue"
	import flowtool from "../c_flowtool.vue"
	import {
		getprojlist
	} from '@/common/api.js'
	export default {
		components: {
		  projinfo,
		  flowtool
		},
		data() {
			return {
				projid:null,
				formState:{Name:'',Dept:{Name:''}},
				flowId: ''
			}
		},
		onLoad(opt) {
			this.projid = opt.id
			this.flowId = opt.flowid
			this.getdate()
		},	
		methods: {
			getdate()
			{
				let para = {
					Parameters: [],
				}
				        para.pageIndex = 1
				        para.pageSize = 20
				para.Parameters.push({
					FieldName: "Id",
					ConditionalType: "Equal",
					FieldValue: this.projid
				})
				// this.mydata={Name:'22',Addr:'',ProjInfo:{Name:''},BuildManager:""}
				getprojlist(para).then(res=>{
					// this.mydata={Name:'33',Addr:'',ProjInfo:{Name:''},BuildManager:""}
					// console.log(this.data)
					 this.formState =res.data[0];
					 // console.log(this.data)
				})
			}
		}
	}
</script>

<style>

</style>
